package org.ISCS.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName dockerimage
 */
@TableName(value ="dockerimage")
@Data
public class Dockerimage implements Serializable {
    /**
     * docker镜像id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * docker镜像下载地址
     */
    private String dockerImageUrl;

    /**
     * docker镜像名称
     */
    private String dockerImageName;

    /**
     * docker镜像生成时间
     */
    private Date dockerImageCreateTime;

    /**
     * docker镜像生成状态
     */
    private Integer dockerImageStatus;

    /**
     * docker镜像隶属服务
     */
    private Long affiliateServiceId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dockerimage other = (Dockerimage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDockerImageUrl() == null ? other.getDockerImageUrl() == null : this.getDockerImageUrl().equals(other.getDockerImageUrl()))
            && (this.getDockerImageName() == null ? other.getDockerImageName() == null : this.getDockerImageName().equals(other.getDockerImageName()))
            && (this.getDockerImageCreateTime() == null ? other.getDockerImageCreateTime() == null : this.getDockerImageCreateTime().equals(other.getDockerImageCreateTime()))
            && (this.getDockerImageStatus() == null ? other.getDockerImageStatus() == null : this.getDockerImageStatus().equals(other.getDockerImageStatus()))
            && (this.getAffiliateServiceId() == null ? other.getAffiliateServiceId() == null : this.getAffiliateServiceId().equals(other.getAffiliateServiceId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDockerImageUrl() == null) ? 0 : getDockerImageUrl().hashCode());
        result = prime * result + ((getDockerImageName() == null) ? 0 : getDockerImageName().hashCode());
        result = prime * result + ((getDockerImageCreateTime() == null) ? 0 : getDockerImageCreateTime().hashCode());
        result = prime * result + ((getDockerImageStatus() == null) ? 0 : getDockerImageStatus().hashCode());
        result = prime * result + ((getAffiliateServiceId() == null) ? 0 : getAffiliateServiceId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dockerImageUrl=").append(dockerImageUrl);
        sb.append(", dockerImageName=").append(dockerImageName);
        sb.append(", dockerImageCreateTime=").append(dockerImageCreateTime);
        sb.append(", dockerImageStatus=").append(dockerImageStatus);
        sb.append(", affiliateServiceId=").append(affiliateServiceId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}